package com.csi.service;

import com.csi.domain.UserBook;
import com.csi.mapper.UserBookMapper;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserBookService {

    @Autowired
    private UserBookMapper userBookMapper;

    @RabbitListener(queues = "userBook.queue")
    public void receiveUserBook(UserBook userBook) {
        userBookMapper.add(userBook);
    }

}
